package com.xindaoapp.henghua.protocol;

import java.util.List;

import com.loopj.android.http.util.Response;
import com.xindaoapp.henghua.entry.ArriveDataInfo;
import com.xindaoapp.henghua.entry.PropertyInfo;
import com.xindaoapp.henghua.entry.PropertyWithLabelDataInfo;
import com.xindaoapp.henghua.entry.ScandataInfo;
import com.xindaoapp.henghua.entry.SuperVisionInfo;
import com.xindaoapp.henghua.entry.TagsInfo;
import com.xindaoapp.henghua.entry.TransportDataInfo;
import com.xindaoapp.henghua.entry.UserInfo;

public interface MoccaApi {

	// t1.hhwy.org/giipms/service?m=trace_login&udid=123456
	public static final String BASEURL = "http://t1.hhwy.org/giipms/service?";
	public static final String LOGINURI = "trace_login";
	public static final String GETPROPERTYDATS = "trace_getpropertydatas";
	public static final String GETTAGS = "trace_gettags";
	public static final String GETPROPERTYWITHLABELDATAS = "trace_getpropertywithlabeldatas";
	public static final String GETSCANDATAS = "trace_getscandatas";
	public static final String GETSUPERVISION = "trace_getsupervision";
	public static final String UPSUPERVISIONDATAS = "trace_upsupervisiondatas";
	public static final String UPARRIVEDATAS = "trace_uparrivedatas";
	public static final String GETARRIVEDATAS = "trace_getarrivedatas";
	public static final String UPTRANSPORTDATAS = "trace_uptransportdatas";
	public static final String GETTRANSPORTDATAS = "trace_gettransportdatas";

	public static final String PARAM_ACTION = "m";
	public static final String PARAM_CURRENTTIME = "currentTime";
	public static final String PARAM_PROJECTID = "project_id";
	
	
	/**
	 * 获取资产信息
	 * 
	 * @param listener
	 * @param errorListener
	 */
	public void getPropertyDatas(String version, String projectId, Response.Listener<PropertyInfo> listener,
			Response.ErrorListener errorListener);

	/**
	 * 登录接口
	 * 
	 * @param udid
	 * @param listener
	 * @param errorListener
	 */
	public void login(String packageName, String versionName, String giipVersion, 
			String udid, Response.Listener<UserInfo> listener, Response.ErrorListener errorListener);

	/**
	 * 获取标签库信息
	 * @param currentTime 版本号
	 */
	public void getTags(String currentTime, Response.Listener<List<TagsInfo>> listener,
			Response.ErrorListener errorListener);
	
	/**
	 * 获取资产标签关联信息
	 */
	public void getPropertyWithLabelDatas(String version, String projectId, Response.Listener<List<PropertyWithLabelDataInfo>> listener, Response.ErrorListener errorListener);
	
	/**
	 * 获取扫描记录
	 * @param currentTime
	 * @param projectId
	 * @param listener
	 * @param errorListener
	 */
	public void getScanDatas(String version, String projectId, Response.Listener<List<ScandataInfo>> listener, Response.ErrorListener errorListener);
	
	/**
	 * 监造上传
	 * @param contentJson
	 * @param listener
	 * @param errorListener
	 */
	public void upSuperVisionDatas(String contentJson, Response.Listener<Boolean> listener, Response.ErrorListener errorListener);
	
	/**
	 * 获取监造信息
	 * @param currentTime
	 * @param projectId
	 * @param listener
	 * @param errorListener
	 */
	public void getSuperVision(String version, String projectId, Response.Listener<List<SuperVisionInfo>> listener, Response.ErrorListener errorListener);
	
	/**
	 * 到货上传
	 * @param contentJson
	 * @param listener
	 * @param errorListener
	 */
	public void upArriveDatas(String contentJson, Response.Listener<Boolean> listener, Response.ErrorListener errorListener);
	
	/**
	 * 获取到货信息
	 * @param currentTime
	 * @param projectId
	 * @param listener
	 * @param errorListener
	 */
	public void getArriveDatas(String version, String projectId, Response.Listener<ArriveDataInfo> listener, Response.ErrorListener errorListener);
	
	/**
	 * 运输上传
	 * @param contentJson
	 * @param listener
	 * @param errorListener
	 */
	public void upTransportDatas(String contentJson, Response.Listener<Boolean> listener, Response.ErrorListener errorListener);
	
	/**
	 * 获取运输信息
	 * @param currentTime
	 * @param projectId
	 * @param listener
	 * @param errorListener
	 */
	public void gettransportDatas(String version, String projectId, Response.Listener<List<TransportDataInfo>> listener, Response.ErrorListener errorListener);
}
